package com.aaa.sbm.controller;


import com.aaa.sbm.entity.StockInApproval;
import com.aaa.sbm.service.StockInApprovalService;
import com.aaa.sbm.util.Page;
import com.aaa.sbm.util.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("stockInApproval")
public class StockInApprovalController {

    @Resource
    private StockInApprovalService stockInApprovalService;

    @PostMapping("list")
    public Result list(@RequestBody(required = false) Page<StockInApproval> stockInApproval){
        return stockInApprovalService.getStockList(stockInApproval);
    }

    @PutMapping("update")
    public Result update(@RequestBody(required = false) StockInApproval stockInApproval) {
        return stockInApprovalService.updateStockIn(stockInApproval);
    }

    @PutMapping("update2")
    public Result update2(@RequestBody(required = false) StockInApproval stockInApproval) {
        return stockInApprovalService.updateStockIn2(stockInApproval);
    }
}
